Integrand size = 25, antiderivative size = 371 \[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=\frac {\left (3 a^2+13 a b+8 b^2\right ) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{15 b f}-\frac {\left (3 a^2+13 a b+8 b^2\right ) \sqrt {\cos ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{15 b f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}+\frac {(a+b) (9 a+8 b) \sqrt {\cos ^2(e+f x)} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}{15 f \left (a+b-a \sin ^2(e+f x)\right )}+\frac {2 (3 a+2 b) \sec (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{15 f}+\frac {b \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{5 f} \]
[Out]
Time = 0.71 (sec) , antiderivative size = 371, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4233, 1985, 1986, 424, 541, 538, 437, 435, 432, 430} \[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=-\frac {\left (3 a^2+13 a b+8 b^2\right ) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right )}{15 b f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}+\frac {\left (3 a^2+13 a b+8 b^2\right ) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )}}{15 b f}+\frac {(a+b) (9 a+8 b) \sqrt {\cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right )}{15 f \left (-a \sin ^2(e+f x)+a+b\right )}+\frac {2 (3 a+2 b) \tan (e+f x) \sec (e+f x) \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )}}{15 f}+\frac {b \tan (e+f x) \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )}}{5 f} \]
[In]
[Out]
Rule 424
Rule 430
Rule 432
Rule 435
Rule 437
Rule 538
Rule 541
Rule 1985
Rule 1986
Rule 4233
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+\frac {b}{1-x^2}\right )^{3/2}}{\left (1-x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \frac {\left (\frac {a+b-a x^2}{1-x^2}\right )^{3/2}}{\left (1-x^2\right )^2} \, dx,x,\sin (e+f x)\right )}{f} \\ & = \frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {\left (a+b-a x^2\right )^{3/2}}{\left (1-x^2\right )^{7/2}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {b \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{5 f}-\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {-((a+b) (5 a+4 b))+a (5 a+3 b) x^2}{\left (1-x^2\right )^{5/2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{5 f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {2 (3 a+2 b) \sec (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{15 f}+\frac {b \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{5 f}-\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {-b (a+b) (9 a+8 b)+2 a b (3 a+2 b) x^2}{\left (1-x^2\right )^{3/2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{15 b f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {\left (3 a^2+13 a b+8 b^2\right ) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{15 b f}+\frac {2 (3 a+2 b) \sec (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{15 f}+\frac {b \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{5 f}-\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {a b (a+b) (3 a+4 b)-a b \left (3 a^2+13 a b+8 b^2\right ) x^2}{\sqrt {1-x^2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{15 b^2 f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {\left (3 a^2+13 a b+8 b^2\right ) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{15 b f}+\frac {2 (3 a+2 b) \sec (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{15 f}+\frac {b \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{5 f}+\frac {\left ((a+b) (9 a+8 b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{15 f \sqrt {a+b-a \sin ^2(e+f x)}}-\frac {\left (\left (3 a^2+13 a b+8 b^2\right ) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {\sqrt {a+b-a x^2}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{15 b f \sqrt {a+b-a \sin ^2(e+f x)}} \\ & = \frac {\left (3 a^2+13 a b+8 b^2\right ) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{15 b f}+\frac {2 (3 a+2 b) \sec (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{15 f}+\frac {b \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{5 f}-\frac {\left (\left (3 a^2+13 a b+8 b^2\right ) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}\right ) \text {Subst}\left (\int \frac {\sqrt {1-\frac {a x^2}{a+b}}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{15 b f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}+\frac {\left ((a+b) (9 a+8 b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1-\frac {a x^2}{a+b}}} \, dx,x,\sin (e+f x)\right )}{15 f \left (a+b-a \sin ^2(e+f x)\right )} \\ & = \frac {\left (3 a^2+13 a b+8 b^2\right ) \sin (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{15 b f}-\frac {\left (3 a^2+13 a b+8 b^2\right ) \sqrt {\cos ^2(e+f x)} E\left (\arcsin (\sin (e+f x))\left |\frac {a}{a+b}\right .\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )}}{15 b f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}+\frac {(a+b) (9 a+8 b) \sqrt {\cos ^2(e+f x)} \operatorname {EllipticF}\left (\arcsin (\sin (e+f x)),\frac {a}{a+b}\right ) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}{15 f \left (a+b-a \sin ^2(e+f x)\right )}+\frac {2 (3 a+2 b) \sec (e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{15 f}+\frac {b \sec ^3(e+f x) \sqrt {\sec ^2(e+f x) \left (a+b-a \sin ^2(e+f x)\right )} \tan (e+f x)}{5 f} \\ \end{align*}
\[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=\int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 13.87 (sec) , antiderivative size = 8946, normalized size of antiderivative = 24.11
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.16 (sec) , antiderivative size = 890, normalized size of antiderivative = 2.40 \[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=\frac {{\left (2 \, {\left (3 i \, a^{3} + 13 i \, a^{2} b + 8 i \, a b^{2}\right )} \sqrt {a} \sqrt {\frac {a b + b^{2}}{a^{2}}} \cos \left (f x + e\right )^{4} - {\left (3 i \, a^{3} + 19 i \, a^{2} b + 34 i \, a b^{2} + 16 i \, b^{3}\right )} \sqrt {a} \cos \left (f x + e\right )^{4}\right )} \sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} E(\arcsin \left (\sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} {\left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {a^{2} + 8 \, a b + 8 \, b^{2} + 4 \, {\left (a^{2} + 2 \, a b\right )} \sqrt {\frac {a b + b^{2}}{a^{2}}}}{a^{2}}) + {\left (2 \, {\left (-3 i \, a^{3} - 13 i \, a^{2} b - 8 i \, a b^{2}\right )} \sqrt {a} \sqrt {\frac {a b + b^{2}}{a^{2}}} \cos \left (f x + e\right )^{4} - {\left (-3 i \, a^{3} - 19 i \, a^{2} b - 34 i \, a b^{2} - 16 i \, b^{3}\right )} \sqrt {a} \cos \left (f x + e\right )^{4}\right )} \sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} E(\arcsin \left (\sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} {\left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {a^{2} + 8 \, a b + 8 \, b^{2} + 4 \, {\left (a^{2} + 2 \, a b\right )} \sqrt {\frac {a b + b^{2}}{a^{2}}}}{a^{2}}) - 2 \, {\left (4 \, {\left (3 i \, a^{2} b + 2 i \, a b^{2}\right )} \sqrt {a} \sqrt {\frac {a b + b^{2}}{a^{2}}} \cos \left (f x + e\right )^{4} + {\left (-3 i \, a^{3} - 13 i \, a^{2} b - 18 i \, a b^{2} - 8 i \, b^{3}\right )} \sqrt {a} \cos \left (f x + e\right )^{4}\right )} \sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} F(\arcsin \left (\sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} {\left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {a^{2} + 8 \, a b + 8 \, b^{2} + 4 \, {\left (a^{2} + 2 \, a b\right )} \sqrt {\frac {a b + b^{2}}{a^{2}}}}{a^{2}}) - 2 \, {\left (4 \, {\left (-3 i \, a^{2} b - 2 i \, a b^{2}\right )} \sqrt {a} \sqrt {\frac {a b + b^{2}}{a^{2}}} \cos \left (f x + e\right )^{4} + {\left (3 i \, a^{3} + 13 i \, a^{2} b + 18 i \, a b^{2} + 8 i \, b^{3}\right )} \sqrt {a} \cos \left (f x + e\right )^{4}\right )} \sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} F(\arcsin \left (\sqrt {\frac {2 \, a \sqrt {\frac {a b + b^{2}}{a^{2}}} - a - 2 \, b}{a}} {\left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right )}\right )\,|\,\frac {a^{2} + 8 \, a b + 8 \, b^{2} + 4 \, {\left (a^{2} + 2 \, a b\right )} \sqrt {\frac {a b + b^{2}}{a^{2}}}}{a^{2}}) + 2 \, {\left ({\left (3 \, a^{3} + 13 \, a^{2} b + 8 \, a b^{2}\right )} \cos \left (f x + e\right )^{4} + 3 \, a b^{2} + 2 \, {\left (3 \, a^{2} b + 2 \, a b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \sqrt {\frac {a \cos \left (f x + e\right )^{2} + b}{\cos \left (f x + e\right )^{2}}} \sin \left (f x + e\right )}{30 \, a b f \cos \left (f x + e\right )^{4}} \]
[In]
[Out]
\[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=\int \left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}} \sec ^{3}{\left (e + f x \right )}\, dx \]
[In]
[Out]
\[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} \sec \left (f x + e\right )^{3} \,d x } \]
[In]
[Out]
\[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=\int { {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} \sec \left (f x + e\right )^{3} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sec ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx=\int \frac {{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^{3/2}}{{\cos \left (e+f\,x\right )}^3} \,d x \]
[In]
[Out]